<ion-header>
    <ion-toolbar>
        <ion-buttons start>
            <button ion-button (click)="dismiss()">取消</button>
        </ion-buttons>
        <ion-title>
            选择权限模块
        </ion-title>
        <ion-buttons end>
            <button ion-button (click)="complete()" strong>确定</button>
        </ion-buttons>
    </ion-toolbar>
</ion-header>
<ion-content class='sysDir-detail'>
    <ion-list class='gfoa-list'>
        <div *ngFor="let item of dirTree">
            <ion-item *ngIf="item.isShow">
                <!-- 父节点 -->
                <ion-row *ngIf="item.hasSub" [ngClass]="'margin-left-'+(5*(item.deep-1))">
                        <ion-col width-10>
                            <ion-icon name="radio-button-off" *ngIf="!item.isChecked" (click)="checkChoice(item)"></ion-icon>
                            <ion-icon name="checkmark-circle" *ngIf="item.isChecked" (click)="checkChoice(item)" color="primary"></ion-icon>
                        </ion-col>
                        <ion-col width-80 (click)="checkShowSub(item)">{{item.dirname}}</ion-col>
                        <ion-col text-right width-10 (click)="checkShowSub(item)">
                            <ion-icon *ngIf="item.isShow && item.hasSub && !item.isShowSub" name="arrow-forward"></ion-icon>
                            <ion-icon *ngIf="item.isShow && item.hasSub && item.isShowSub" name="arrow-down"></ion-icon>
                        </ion-col>
                </ion-row>
                <!-- 子节点 -->
                 <ion-row *ngIf="!item.hasSub" [ngClass]="'margin-left-'+(5*(item.deep-1))" (click)="checkChoice(item)">
                        <ion-col width-10>
                            <ion-icon name="radio-button-off" *ngIf="!item.isChecked"></ion-icon>
                            <ion-icon name="checkmark-circle" *ngIf="item.isChecked" color="primary"></ion-icon>
                        </ion-col>
                        <ion-col width-80 (click)="checkShowSub(item)">{{item.dirname}}</ion-col>
                </ion-row>
            </ion-item>
        </div>
    </ion-list>
</ion-content>
